﻿using Mono.Cecil;

public class LuaTypeReference : LuaMemberReference<TypeReference>
{
    private ObjectKind _stackType;
    public LuaTypeReference(LuaModuleDefinition module, TypeReference self)
        : base(module, self)
    {
        Namespace = ToNamespace(self.Namespace);
        _stackType = Resolve().ToStackType();
        if (self.IsGenericInstance)
        {
            Name = ToGenericName(self.Name);
            FullName = ToGenericFullName(self.FullName);
        }
    }
    public ObjectKind StackType
        => _stackType;
    public string Namespace { get; }
}
